package com.trp.model.asset;

import com.trp.model.CIMModel;
import com.trp.model.psr.PoleSite;

import java.util.HashMap;
import java.util.Map;

public class Pole extends CIMModel {

	private Map<String, PoleSite> mPoleSites;

	private double x;

	private double y;

	@Override
	protected void init() {
		mPoleSites = new HashMap<String, PoleSite>();
		this.mType = CIMModel.Type.POLE;
	}

	public void addPoleSite(PoleSite poleSite) {
		if (poleSite == null || poleSite.getID() == null || poleSite.getID().isEmpty()) {
			throw new NullPointerException(" can not add null polesite to pole!");
		}
		mPoleSites.put(poleSite.getID(), poleSite);
	}

	public void removePoleSite(PoleSite poleSite) {
		mPoleSites.remove(poleSite);
	}

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}


}
